<!doctype html>



  


<html class="theme-next mist use-motion" lang="zh-Hans">
<head>
  <meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>



<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />












  
  
  <link href="/lib/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css" />




  
  
  
  

  
    
    
  

  

  

  

  

  
    
    
    <link href="//fonts.googleapis.com/css?family=Lato:300,300italic,400,400italic,700,700italic&subset=latin,latin-ext" rel="stylesheet" type="text/css">
  






<link href="/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css" />

<link href="/css/main.css?v=5.1.0" rel="stylesheet" type="text/css" />


  <meta name="keywords" content="Hexo, NexT" />








  <link rel="shortcut icon" type="image/x-icon" href="/favicon.ico?v=5.1.0" />






<meta name="description" content="永远年轻，永远热泪盈眶。">
<meta property="og:type" content="website">
<meta property="og:title" content="JokerLiang">
<meta property="og:url" content="http://yoursite.com/page/3/index.html">
<meta property="og:site_name" content="JokerLiang">
<meta property="og:description" content="永远年轻，永远热泪盈眶。">
<meta property="og:locale" content="zh-Hans">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="JokerLiang">
<meta name="twitter:description" content="永远年轻，永远热泪盈眶。">



<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/',
    scheme: 'Mist',
    sidebar: {"position":"left","display":"always"},
    fancybox: true,
    motion: true,
    duoshuo: {
      userId: '0',
      author: '博主'
    },
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>



  <link rel="canonical" href="http://yoursite.com/page/3/"/>





  <title> JokerLiang </title>
</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-Hans">

  








  <div style="display: none;">
    <script src="//s95.cnzz.com/z_stat.php?id=1260895995&web_id=1260895995" language="JavaScript"></script>
  </div>





  
  
    
  

  <div class="container one-collumn sidebar-position-left 
   page-home 
 ">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-meta ">
  

  <div class="custom-logo-site-title">
    <a href="/"  class="brand" rel="start">
      <span class="logo-line-before"><i></i></span>
      <span class="site-title">JokerLiang</span>
      <span class="logo-line-after"><i></i></span>
    </a>
  </div>
  <p class="site-subtitle">永远年轻，永远热泪盈眶。</p>
</div>

<div class="site-nav-toggle">
  <button>
    <span class="btn-bar"></span>
    <span class="btn-bar"></span>
    <span class="btn-bar"></span>
  </button>
</div>

<nav class="site-nav">
  

  
    <ul id="menu" class="menu">
      
        
        <li class="menu-item menu-item-home">
          <a href="/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-home"></i> <br />
            
            首页
          </a>
        </li>
      
        
        <li class="menu-item menu-item-categories">
          <a href="/categories" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-th"></i> <br />
            
            分类
          </a>
        </li>
      
        
        <li class="menu-item menu-item-archives">
          <a href="/archives" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-archive"></i> <br />
            
            归档
          </a>
        </li>
      
        
        <li class="menu-item menu-item-tags">
          <a href="/tags" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-tags"></i> <br />
            
            标签
          </a>
        </li>
      

      
        <li class="menu-item menu-item-search">
          
            <a href="javascript:;" class="popup-trigger">
          
            
              <i class="menu-item-icon fa fa-search fa-fw"></i> <br />
            
            搜索
          </a>
        </li>
      
    </ul>
  

  
    <div class="site-search">
      
  <div class="popup">
 <span class="search-icon fa fa-search"></span>
 <input type="text" id="local-search-input">
 <div id="local-search-result"></div>
 <span class="popup-btn-close">close</span>
</div>


    </div>
  
</nav>



 </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            
  <section id="posts" class="posts-expand">
    
      

  

  
  
  

  <article class="post post-type-normal " itemscope itemtype="http://schema.org/Article">
  <link itemprop="mainEntityOfPage" href="http://yoursite.com/2017/06/01/bos-four/">

  <span style="display:none" itemprop="author" itemscope itemtype="http://schema.org/Person">
    <meta itemprop="name" content="JokerLiang">
    <meta itemprop="description" content="">
    <meta itemprop="image" content="/images/me.jpg">
  </span>

  <span style="display:none" itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
    <meta itemprop="name" content="JokerLiang">
    <span style="display:none" itemprop="logo" itemscope itemtype="http://schema.org/ImageObject">
      <img style="display:none;" itemprop="url image" alt="JokerLiang" src="">
    </span>
  </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">
            
            
              
                
                <a class="post-title-link" href="/2017/06/01/bos-four/" itemprop="url">
                  bos-four
                </a>
              
            
          </h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              <span class="post-meta-item-text">发表于</span>
              <time title="Post created" itemprop="dateCreated datePublished" datetime="2017-06-01T18:54:47+08:00">
                2017-06-01
              </time>
            

            

            
          </span>

          
            <span class="post-category" >
              <span class="post-meta-divider">|</span>
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              <span class="post-meta-item-text">分类于</span>
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/Bos项目/" itemprop="url" rel="index">
                    <span itemprop="name">Bos项目</span>
                  </a>
                </span>

                
                
              
            </span>
          

          
            
          

          

          
          

          

          

        </div>
      </header>
    


    <div class="post-body" itemprop="articleBody">

      
      

      
        
          <blockquote>
<p>宠辱不惊，看庭前花开花落；去留无意，望天上云卷云舒。</p>
</blockquote>
<h2 id="分页查询死循环问题"><a href="#分页查询死循环问题" class="headerlink" title="分页查询死循环问题"></a>分页查询死循环问题</h2><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">1、页面不需要展示关联数据时</span><br><span class="line">解决：将关联对象属性排除掉</span><br><span class="line"></span><br><span class="line">2、页面需要展示关联数据时</span><br><span class="line">解决：将关联对象改为立即加载，并且将关联对象中的属性排除</span><br></pre></td></tr></table></figure>
          <!--noindex-->
          <div class="post-more-link text-center">
            <a class="btn" href="/2017/06/01/bos-four/#more" rel="contents">
              阅读全文 &raquo;
            </a>
          </div>
          <!--/noindex-->
        
      
    </div>

    <div>
      
    </div>

    <div>
      
    </div>


    <footer class="post-footer">
      

      

      
      
        <div class="post-eof"></div>
      
    </footer>
  </article>


    
      

  

  
  
  

  <article class="post post-type-normal " itemscope itemtype="http://schema.org/Article">
  <link itemprop="mainEntityOfPage" href="http://yoursite.com/2017/05/29/bos-three/">

  <span style="display:none" itemprop="author" itemscope itemtype="http://schema.org/Person">
    <meta itemprop="name" content="JokerLiang">
    <meta itemprop="description" content="">
    <meta itemprop="image" content="/images/me.jpg">
  </span>

  <span style="display:none" itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
    <meta itemprop="name" content="JokerLiang">
    <span style="display:none" itemprop="logo" itemscope itemtype="http://schema.org/ImageObject">
      <img style="display:none;" itemprop="url image" alt="JokerLiang" src="">
    </span>
  </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">
            
            
              
                
                <a class="post-title-link" href="/2017/05/29/bos-three/" itemprop="url">
                  bos-three
                </a>
              
            
          </h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              <span class="post-meta-item-text">发表于</span>
              <time title="Post created" itemprop="dateCreated datePublished" datetime="2017-05-29T17:44:31+08:00">
                2017-05-29
              </time>
            

            

            
          </span>

          
            <span class="post-category" >
              <span class="post-meta-divider">|</span>
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              <span class="post-meta-item-text">分类于</span>
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/Bos项目/" itemprop="url" rel="index">
                    <span itemprop="name">Bos项目</span>
                  </a>
                </span>

                
                
              
            </span>
          

          
            
          

          

          
          

          

          

        </div>
      </header>
    


    <div class="post-body" itemprop="articleBody">

      
      

      
        
          <blockquote>
<p>与未知的相遇，七分欢喜三分孤寂。</p>
</blockquote>
<h2 id="分页方法整理"><a href="#分页方法整理" class="headerlink" title="分页方法整理"></a>分页方法整理</h2><h3 id="设计PageBean"><a href="#设计PageBean" class="headerlink" title="设计PageBean"></a>设计PageBean</h3><figure class="highlight java"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">private</span> Integer currentPage ;<span class="comment">//当前页码</span></span><br><span class="line"><span class="keyword">private</span> Integer pageSize;<span class="comment">//每页显示的记录数量</span></span><br><span class="line"><span class="keyword">private</span> DetachedCriteria detachedCriteria;<span class="comment">//查询条件</span></span><br><span class="line"><span class="keyword">private</span> Integer total;<span class="comment">//总记录数</span></span><br><span class="line"><span class="keyword">private</span> List rows; <span class="comment">//当前页所需要展示的记录集合</span></span><br></pre></td></tr></table></figure>
          <!--noindex-->
          <div class="post-more-link text-center">
            <a class="btn" href="/2017/05/29/bos-three/#more" rel="contents">
              阅读全文 &raquo;
            </a>
          </div>
          <!--/noindex-->
        
      
    </div>

    <div>
      
    </div>

    <div>
      
    </div>


    <footer class="post-footer">
      

      

      
      
        <div class="post-eof"></div>
      
    </footer>
  </article>


    
      

  

  
  
  

  <article class="post post-type-normal " itemscope itemtype="http://schema.org/Article">
  <link itemprop="mainEntityOfPage" href="http://yoursite.com/2017/05/23/bos-two/">

  <span style="display:none" itemprop="author" itemscope itemtype="http://schema.org/Person">
    <meta itemprop="name" content="JokerLiang">
    <meta itemprop="description" content="">
    <meta itemprop="image" content="/images/me.jpg">
  </span>

  <span style="display:none" itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
    <meta itemprop="name" content="JokerLiang">
    <span style="display:none" itemprop="logo" itemscope itemtype="http://schema.org/ImageObject">
      <img style="display:none;" itemprop="url image" alt="JokerLiang" src="">
    </span>
  </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">
            
            
              
                
                <a class="post-title-link" href="/2017/05/23/bos-two/" itemprop="url">
                  bos-two
                </a>
              
            
          </h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              <span class="post-meta-item-text">发表于</span>
              <time title="Post created" itemprop="dateCreated datePublished" datetime="2017-05-23T19:16:45+08:00">
                2017-05-23
              </time>
            

            

            
          </span>

          
            <span class="post-category" >
              <span class="post-meta-divider">|</span>
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              <span class="post-meta-item-text">分类于</span>
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/Bos项目/" itemprop="url" rel="index">
                    <span itemprop="name">Bos项目</span>
                  </a>
                </span>

                
                
              
            </span>
          

          
            
          

          

          
          

          

          

        </div>
      </header>
    


    <div class="post-body" itemprop="articleBody">

      
      

      
        
          <blockquote>
<p>无法沉淀的价值终将只是现象级</p>
</blockquote>
<h2 id="Jq插件Ztree的使用"><a href="#Jq插件Ztree的使用" class="headerlink" title="Jq插件Ztree的使用"></a>Jq插件Ztree的使用</h2><h3 id="使用简单Json数据构造ztree"><a href="#使用简单Json数据构造ztree" class="headerlink" title="使用简单Json数据构造ztree"></a>使用简单Json数据构造ztree</h3><figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br></pre></td><td class="code"><pre><span class="line">$(<span class="function"><span class="keyword">function</span>(<span class="params"></span>)</span>&#123;</span><br><span class="line">	<span class="comment">//页面加载完成后，执行这段代码----动态创建ztree</span></span><br><span class="line">	<span class="keyword">var</span> setting2 = &#123;</span><br><span class="line">			data: &#123;</span><br><span class="line">				simpleData: &#123;</span><br><span class="line">					enable: <span class="literal">true</span><span class="comment">//使用简单json数据构造ztree节点</span></span><br><span class="line">				&#125;</span><br><span class="line">			&#125;</span><br><span class="line">	&#125;;</span><br><span class="line">	<span class="comment">//构造节点数据</span></span><br><span class="line">	<span class="keyword">var</span> zNodes2 = [</span><br><span class="line">				&#123;<span class="string">"id"</span>:<span class="string">"1"</span>,<span class="string">"pId"</span>:<span class="string">"2"</span>,<span class="string">"name"</span>:<span class="string">"节点一"</span>&#125;,<span class="comment">//每个json对象表示一个节点数据</span></span><br><span class="line">				&#123;<span class="string">"id"</span>:<span class="string">"2"</span>,<span class="string">"pId"</span>:<span class="string">"3"</span>,<span class="string">"name"</span>:<span class="string">"节点二"</span>&#125;,</span><br><span class="line">				&#123;<span class="string">"id"</span>:<span class="string">"3"</span>,<span class="string">"pId"</span>:<span class="string">"0"</span>,<span class="string">"name"</span>:<span class="string">"节点三"</span>&#125;</span><br><span class="line">			];</span><br><span class="line">			<span class="comment">//调用API初始化ztree</span></span><br><span class="line">			$.fn.zTree.init($(<span class="string">"#ztree2"</span>), setting2, zNodes2);</span><br><span class="line">	&#125;);</span><br></pre></td></tr></table></figure>
          <!--noindex-->
          <div class="post-more-link text-center">
            <a class="btn" href="/2017/05/23/bos-two/#more" rel="contents">
              阅读全文 &raquo;
            </a>
          </div>
          <!--/noindex-->
        
      
    </div>

    <div>
      
    </div>

    <div>
      
    </div>


    <footer class="post-footer">
      

      

      
      
        <div class="post-eof"></div>
      
    </footer>
  </article>


    
      

  

  
  
  

  <article class="post post-type-normal " itemscope itemtype="http://schema.org/Article">
  <link itemprop="mainEntityOfPage" href="http://yoursite.com/2017/05/21/bos-one/">

  <span style="display:none" itemprop="author" itemscope itemtype="http://schema.org/Person">
    <meta itemprop="name" content="JokerLiang">
    <meta itemprop="description" content="">
    <meta itemprop="image" content="/images/me.jpg">
  </span>

  <span style="display:none" itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
    <meta itemprop="name" content="JokerLiang">
    <span style="display:none" itemprop="logo" itemscope itemtype="http://schema.org/ImageObject">
      <img style="display:none;" itemprop="url image" alt="JokerLiang" src="">
    </span>
  </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">
            
            
              
                
                <a class="post-title-link" href="/2017/05/21/bos-one/" itemprop="url">
                  bos-one
                </a>
              
            
          </h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              <span class="post-meta-item-text">发表于</span>
              <time title="Post created" itemprop="dateCreated datePublished" datetime="2017-05-21T18:03:38+08:00">
                2017-05-21
              </time>
            

            

            
          </span>

          
            <span class="post-category" >
              <span class="post-meta-divider">|</span>
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              <span class="post-meta-item-text">分类于</span>
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/Bos项目/" itemprop="url" rel="index">
                    <span itemprop="name">Bos项目</span>
                  </a>
                </span>

                
                
              
            </span>
          

          
            
          

          

          
          

          

          

        </div>
      </header>
    


    <div class="post-body" itemprop="articleBody">

      
      

      
        
          <blockquote>
<p>每一个不曾起舞的日子，都是对生命的辜负。</p>
</blockquote>
<h2 id="创建Maven环境"><a href="#创建Maven环境" class="headerlink" title="创建Maven环境"></a>创建Maven环境</h2><h3 id="创建父工程bos-parent"><a href="#创建父工程bos-parent" class="headerlink" title="创建父工程bos-parent"></a>创建父工程bos-parent</h3><ul>
<li>打包方式选择：pom</li>
<li>pom.xml写法
          <!--noindex-->
          <div class="post-more-link text-center">
            <a class="btn" href="/2017/05/21/bos-one/#more" rel="contents">
              阅读全文 &raquo;
            </a>
          </div>
          <!--/noindex-->
        
      
    </div>

    <div>
      
    </div>

    <div>
      
    </div>


    <footer class="post-footer">
      

      

      
      
        <div class="post-eof"></div>
      
    </footer>
  </article>


    
      

  

  
  
  

  <article class="post post-type-normal " itemscope itemtype="http://schema.org/Article">
  <link itemprop="mainEntityOfPage" href="http://yoursite.com/2017/05/21/Maven/">

  <span style="display:none" itemprop="author" itemscope itemtype="http://schema.org/Person">
    <meta itemprop="name" content="JokerLiang">
    <meta itemprop="description" content="">
    <meta itemprop="image" content="/images/me.jpg">
  </span>

  <span style="display:none" itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
    <meta itemprop="name" content="JokerLiang">
    <span style="display:none" itemprop="logo" itemscope itemtype="http://schema.org/ImageObject">
      <img style="display:none;" itemprop="url image" alt="JokerLiang" src="">
    </span>
  </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">
            
            
              
                
                <a class="post-title-link" href="/2017/05/21/Maven/" itemprop="url">
                  Maven
                </a>
              
            
          </h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              <span class="post-meta-item-text">发表于</span>
              <time title="Post created" itemprop="dateCreated datePublished" datetime="2017-05-21T18:02:36+08:00">
                2017-05-21
              </time>
            

            

            
          </span>

          
            <span class="post-category" >
              <span class="post-meta-divider">|</span>
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              <span class="post-meta-item-text">分类于</span>
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/工具使用/" itemprop="url" rel="index">
                    <span itemprop="name">工具使用</span>
                  </a>
                </span>

                
                
              
            </span>
          

          
            
          

          

          
          

          

          

        </div>
      </header>
    


    <div class="post-body" itemprop="articleBody">

      
      

      
        
          <blockquote>
<p>到尽人事，莫问前程。</p>
</blockquote>
<h2 id="maven文件创建方法"><a href="#maven文件创建方法" class="headerlink" title="maven文件创建方法"></a>maven文件创建方法</h2><ol>
<li>手动在webapp文件夹下创建一个WEB-INF文件夹，在里面放一个web.xml文件。</li>
<li>在pom.xml中添加如下代码<figure class="highlight xml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">build</span>&gt;</span></span><br><span class="line">		<span class="comment">&lt;!-- 配置了很多插件 --&gt;</span></span><br><span class="line">		<span class="tag">&lt;<span class="name">plugins</span>&gt;</span></span><br><span class="line">			<span class="tag">&lt;<span class="name">plugin</span>&gt;</span></span><br><span class="line">				<span class="tag">&lt;<span class="name">groupId</span>&gt;</span>org.apache.maven.plugins<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line">				<span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>maven-compiler-plugin<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line">				<span class="tag">&lt;<span class="name">version</span>&gt;</span>3.5.1<span class="tag">&lt;/<span class="name">version</span>&gt;</span>  </span><br><span class="line">				<span class="tag">&lt;<span class="name">configuration</span>&gt;</span></span><br><span class="line">					<span class="tag">&lt;<span class="name">source</span>&gt;</span>1.7<span class="tag">&lt;/<span class="name">source</span>&gt;</span></span><br><span class="line">					<span class="tag">&lt;<span class="name">target</span>&gt;</span>1.7<span class="tag">&lt;/<span class="name">target</span>&gt;</span></span><br><span class="line">					<span class="tag">&lt;<span class="name">encoding</span>&gt;</span>UTF-8<span class="tag">&lt;/<span class="name">encoding</span>&gt;</span></span><br><span class="line">				<span class="tag">&lt;/<span class="name">configuration</span>&gt;</span></span><br><span class="line">			<span class="tag">&lt;/<span class="name">plugin</span>&gt;</span></span><br><span class="line">		<span class="tag">&lt;/<span class="name">plugins</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;/<span class="name">build</span>&gt;</span></span><br></pre></td></tr></table></figure>
</li>
</ol>
          <!--noindex-->
          <div class="post-more-link text-center">
            <a class="btn" href="/2017/05/21/Maven/#more" rel="contents">
              阅读全文 &raquo;
            </a>
          </div>
          <!--/noindex-->
        
      
    </div>

    <div>
      
    </div>

    <div>
      
    </div>


    <footer class="post-footer">
      

      

      
      
        <div class="post-eof"></div>
      
    </footer>
  </article>


    
      

  

  
  
  

  <article class="post post-type-normal " itemscope itemtype="http://schema.org/Article">
  <link itemprop="mainEntityOfPage" href="http://yoursite.com/2017/05/17/数据库-oracle基础/">

  <span style="display:none" itemprop="author" itemscope itemtype="http://schema.org/Person">
    <meta itemprop="name" content="JokerLiang">
    <meta itemprop="description" content="">
    <meta itemprop="image" content="/images/me.jpg">
  </span>

  <span style="display:none" itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
    <meta itemprop="name" content="JokerLiang">
    <span style="display:none" itemprop="logo" itemscope itemtype="http://schema.org/ImageObject">
      <img style="display:none;" itemprop="url image" alt="JokerLiang" src="">
    </span>
  </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">
            
            
              
                
                <a class="post-title-link" href="/2017/05/17/数据库-oracle基础/" itemprop="url">
                  数据库-oracle基础
                </a>
              
            
          </h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              <span class="post-meta-item-text">发表于</span>
              <time title="Post created" itemprop="dateCreated datePublished" datetime="2017-05-17T08:02:17+08:00">
                2017-05-17
              </time>
            

            

            
          </span>

          
            <span class="post-category" >
              <span class="post-meta-divider">|</span>
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              <span class="post-meta-item-text">分类于</span>
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/数据库/" itemprop="url" rel="index">
                    <span itemprop="name">数据库</span>
                  </a>
                </span>

                
                
              
            </span>
          

          
            
          

          

          
          

          

          

        </div>
      </header>
    


    <div class="post-body" itemprop="articleBody">

      
      

      
        
          <blockquote>
<p>人的一切痛苦，本质上都是对自己的无能的愤怒。</p>
</blockquote>
<h2 id="基础"><a href="#基础" class="headerlink" title="基础"></a>基础</h2><ul>
<li>nal(a,b)当a为Null的时候取值b，当a不为null时。</li>
<li>select * from money is null ,—–查询money字段为空值的记录</li>
<li>oracle 别名 和Mysql 一样.</li>
<li>sekect distinct money from emp —查询emp表中所有的钱的数量，去除重复。distinct这个关键字表示去重.</li>
<li>在Oracle中单引号表示日期和字符，双引号表示列的别名。</li>
<li>between a and b 查询大于等于a小于等于b的值</li>
<li>like 模糊查询 %表示任意长度的任意字符串  _表示任意字符的一个字符串, \表示转义字符.</li>
<li>在and语句中，where解析顺序 右—-&gt;左</li>
<li>order by 后面 +列、表达式、别名、序号 + 排序规则 asc desc</li>
<li>order by 作用于后面所有的列，先按照第一个列排序，再后面的列，desc降序 制作用于离他最近的列。</li>
<li>nulls last 表示如果有空值，空值放在最后  select * from emp order by money desc nulls last  升序时没有问题。因为在oracle数据库中，null最大</li>
<li>dual 为oracle中没有意义的空表</li>
<li>去掉delect产生后的碎片 alter table &lt;表名&gt;mover 提高查询速度</li>
<li>rownum 行号 select rownum from a ， rownum永远按照默认（即使排完序后行号也不变）的顺序，rownum只能使用小于，小于等于，不能用其他。</li>
<li>top-n问题：select f<em> from (select </em> from a order by money desc) where rownum&lt;=3.</li>
<li>所有包含于select列表中，而未包含于组函数中的列，都必须包含于GroupBy子句中。包含在Group子句中的列，不一定要包含在select中。</li>
<li>多个列的分组：先按照第一个列分组，如果相同，再按照第二个列分组，以此类推。  </li>
<li>having语句：从分组的基础上，过滤。select b avg(c) from table group by b having avg(c)&gt;2000.和where的区别是，having可以使用组函数（多行函数）。</li>
<li>group by rollup(a,b) : 报表常用。</li>
</ul>
<h2 id="函数"><a href="#函数" class="headerlink" title="函数"></a>函数</h2>
          <!--noindex-->
          <div class="post-more-link text-center">
            <a class="btn" href="/2017/05/17/数据库-oracle基础/#more" rel="contents">
              阅读全文 &raquo;
            </a>
          </div>
          <!--/noindex-->
        
      
    </div>

    <div>
      
    </div>

    <div>
      
    </div>


    <footer class="post-footer">
      

      

      
      
        <div class="post-eof"></div>
      
    </footer>
  </article>


    
      

  

  
  
  

  <article class="post post-type-normal " itemscope itemtype="http://schema.org/Article">
  <link itemprop="mainEntityOfPage" href="http://yoursite.com/2017/05/15/Crm总结/">

  <span style="display:none" itemprop="author" itemscope itemtype="http://schema.org/Person">
    <meta itemprop="name" content="JokerLiang">
    <meta itemprop="description" content="">
    <meta itemprop="image" content="/images/me.jpg">
  </span>

  <span style="display:none" itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
    <meta itemprop="name" content="JokerLiang">
    <span style="display:none" itemprop="logo" itemscope itemtype="http://schema.org/ImageObject">
      <img style="display:none;" itemprop="url image" alt="JokerLiang" src="">
    </span>
  </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">
            
            
              
                
                <a class="post-title-link" href="/2017/05/15/Crm总结/" itemprop="url">
                  Crm总结
                </a>
              
            
          </h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              <span class="post-meta-item-text">发表于</span>
              <time title="Post created" itemprop="dateCreated datePublished" datetime="2017-05-15T15:07:29+08:00">
                2017-05-15
              </time>
            

            

            
          </span>

          
            <span class="post-category" >
              <span class="post-meta-divider">|</span>
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              <span class="post-meta-item-text">分类于</span>
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/JAVAWEB/" itemprop="url" rel="index">
                    <span itemprop="name">JAVAWEB</span>
                  </a>
                </span>

                
                
              
            </span>
          

          
            
          

          

          
          

          

          

        </div>
      </header>
    


    <div class="post-body" itemprop="articleBody">

      
      

      
        
          <blockquote>
<p>一人一椅一壶茶，清坐林间看落花。 蜂飞蝶舞不着意，淡月清风逐晚霞。</p>
</blockquote>
<h2 id="分页PageBean类的设计"><a href="#分页PageBean类的设计" class="headerlink" title="分页PageBean类的设计"></a>分页PageBean类的设计</h2><figure class="highlight java"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">public</span> <span class="class"><span class="keyword">class</span> <span class="title">PageBean</span> </span>&#123;</span><br><span class="line">	<span class="comment">//省略了GetSet方法</span></span><br><span class="line">	<span class="keyword">private</span> Integer currentPage; <span class="comment">//当前页数</span></span><br><span class="line">	<span class="keyword">private</span> Integer totalCount;  <span class="comment">//总记录数</span></span><br><span class="line">	<span class="keyword">private</span> Integer pageSize; <span class="comment">// 每页记录条数</span></span><br><span class="line">	<span class="keyword">private</span> Integer totalPage; <span class="comment">//总页数</span></span><br><span class="line">	<span class="keyword">private</span> List  list ; <span class="comment">// 每页的数据</span></span><br><span class="line">	</span><br><span class="line">	<span class="function"><span class="keyword">public</span> <span class="title">PageBean</span><span class="params">(Integer currentPage, Integer totalCount, Integer pageSize)</span> </span>&#123;</span><br><span class="line">		<span class="keyword">this</span>.totalCount = totalCount; </span><br><span class="line">		</span><br><span class="line">		<span class="keyword">this</span>.currentPage = currentPage;</span><br><span class="line">		</span><br><span class="line">		<span class="keyword">this</span>.pageSize = pageSize;</span><br><span class="line">		</span><br><span class="line">		<span class="keyword">if</span>(<span class="keyword">this</span>.currentPage == <span class="keyword">null</span>)&#123;</span><br><span class="line">			<span class="comment">//如果没有选择页码，就看第一页</span></span><br><span class="line">			<span class="keyword">this</span>.currentPage = <span class="number">1</span>;</span><br><span class="line">		&#125;</span><br><span class="line">		</span><br><span class="line">		<span class="keyword">if</span>(<span class="keyword">this</span>.pageSize == <span class="keyword">null</span>)&#123;</span><br><span class="line">			<span class="comment">//没有选择每页显示的条数，则默认显示2条</span></span><br><span class="line">			<span class="keyword">this</span>.pageSize = <span class="number">2</span>;</span><br><span class="line">		&#125;</span><br><span class="line">		</span><br><span class="line">		<span class="comment">//计算总页数</span></span><br><span class="line">		<span class="keyword">this</span>.totalPage = <span class="keyword">this</span>.totalCount % <span class="keyword">this</span>.pageSize == <span class="number">0</span> ?<span class="keyword">this</span>.totalCount / <span class="keyword">this</span>.pageSize : (<span class="keyword">this</span>.totalCount / <span class="keyword">this</span>.pageSize)+<span class="number">1</span>;</span><br><span class="line">		</span><br><span class="line">		<span class="comment">//判断当前页数是否超出范围</span></span><br><span class="line">		<span class="keyword">if</span>(<span class="keyword">this</span>.currentPage&lt; <span class="number">1</span>)&#123;</span><br><span class="line">			<span class="keyword">this</span>.currentPage = <span class="number">1</span>;</span><br><span class="line">		&#125;</span><br><span class="line">		<span class="keyword">if</span>(<span class="keyword">this</span>.currentPage&gt;<span class="keyword">this</span>.totalPage)&#123;</span><br><span class="line">			<span class="keyword">this</span>.currentPage = <span class="keyword">this</span>.totalPage ;</span><br><span class="line">		&#125;</span><br><span class="line">		</span><br><span class="line">	</span><br><span class="line">	&#125;</span><br><span class="line"></span><br><span class="line">	<span class="comment">//计算起始索引</span></span><br><span class="line">	<span class="function"><span class="keyword">public</span> <span class="keyword">int</span> <span class="title">getStart</span><span class="params">()</span></span>&#123;</span><br><span class="line">		<span class="keyword">return</span> (<span class="keyword">this</span>.currentPage-<span class="number">1</span>)*<span class="keyword">this</span>.pageSize;</span><br><span class="line">	&#125;</span><br></pre></td></tr></table></figure>
          <!--noindex-->
          <div class="post-more-link text-center">
            <a class="btn" href="/2017/05/15/Crm总结/#more" rel="contents">
              阅读全文 &raquo;
            </a>
          </div>
          <!--/noindex-->
        
      
    </div>

    <div>
      
    </div>

    <div>
      
    </div>


    <footer class="post-footer">
      

      

      
      
        <div class="post-eof"></div>
      
    </footer>
  </article>


    
      

  

  
  
  

  <article class="post post-type-normal " itemscope itemtype="http://schema.org/Article">
  <link itemprop="mainEntityOfPage" href="http://yoursite.com/2017/05/02/Spring1-简单入门，WEB端的整合/">

  <span style="display:none" itemprop="author" itemscope itemtype="http://schema.org/Person">
    <meta itemprop="name" content="JokerLiang">
    <meta itemprop="description" content="">
    <meta itemprop="image" content="/images/me.jpg">
  </span>

  <span style="display:none" itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
    <meta itemprop="name" content="JokerLiang">
    <span style="display:none" itemprop="logo" itemscope itemtype="http://schema.org/ImageObject">
      <img style="display:none;" itemprop="url image" alt="JokerLiang" src="">
    </span>
  </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">
            
            
              
                
                <a class="post-title-link" href="/2017/05/02/Spring1-简单入门，WEB端的整合/" itemprop="url">
                  Spring1-简单入门，WEB端的整合
                </a>
              
            
          </h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              <span class="post-meta-item-text">发表于</span>
              <time title="Post created" itemprop="dateCreated datePublished" datetime="2017-05-02T11:49:34+08:00">
                2017-05-02
              </time>
            

            

            
          </span>

          
            <span class="post-category" >
              <span class="post-meta-divider">|</span>
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              <span class="post-meta-item-text">分类于</span>
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/Spring/" itemprop="url" rel="index">
                    <span itemprop="name">Spring</span>
                  </a>
                </span>

                
                
              
            </span>
          

          
            
          

          

          
          

          

          

        </div>
      </header>
    


    <div class="post-body" itemprop="articleBody">

      
      

      
        
          <blockquote>
<p>怕什么真理无穷，进一寸有进一寸的欢喜</p>
</blockquote>
<h2 id="bean元素的配置"><a href="#bean元素的配置" class="headerlink" title="bean元素的配置"></a>bean元素的配置</h2><figure class="highlight xml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br></pre></td><td class="code"><pre><span class="line"></span><br><span class="line"><span class="comment">&lt;!-- 将User对象交给spring容器管理 --&gt;</span></span><br><span class="line"><span class="comment">&lt;!-- Bean元素:使用该元素描述需要spring容器管理的对象</span></span><br><span class="line"><span class="comment">		class属性:被管理对象的完整类名.</span></span><br><span class="line"><span class="comment">		name属性:给被管理的对象起个名字.获得对象时根据该名称获得对象.  </span></span><br><span class="line"><span class="comment">				可以重复.可以使用特殊字符.</span></span><br><span class="line"><span class="comment">		id属性: 与name属性一模一样. </span></span><br><span class="line"><span class="comment">				名称不可重复.不能使用特殊字符.</span></span><br><span class="line"><span class="comment">		结论: 尽量使用name属性.</span></span><br><span class="line"><span class="comment">  --&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">bean</span>  <span class="attr">name</span>=<span class="string">"user"</span> <span class="attr">class</span>=<span class="string">"cn.itcast.bean.User"</span> &gt;</span><span class="tag">&lt;/<span class="name">bean</span>&gt;</span></span><br></pre></td></tr></table></figure>
          <!--noindex-->
          <div class="post-more-link text-center">
            <a class="btn" href="/2017/05/02/Spring1-简单入门，WEB端的整合/#more" rel="contents">
              阅读全文 &raquo;
            </a>
          </div>
          <!--/noindex-->
        
      
    </div>

    <div>
      
    </div>

    <div>
      
    </div>


    <footer class="post-footer">
      

      

      
      
        <div class="post-eof"></div>
      
    </footer>
  </article>


    
      

  

  
  
  

  <article class="post post-type-normal " itemscope itemtype="http://schema.org/Article">
  <link itemprop="mainEntityOfPage" href="http://yoursite.com/2017/04/23/2017-4-23/">

  <span style="display:none" itemprop="author" itemscope itemtype="http://schema.org/Person">
    <meta itemprop="name" content="JokerLiang">
    <meta itemprop="description" content="">
    <meta itemprop="image" content="/images/me.jpg">
  </span>

  <span style="display:none" itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
    <meta itemprop="name" content="JokerLiang">
    <span style="display:none" itemprop="logo" itemscope itemtype="http://schema.org/ImageObject">
      <img style="display:none;" itemprop="url image" alt="JokerLiang" src="">
    </span>
  </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">
            
            
              
                
                <a class="post-title-link" href="/2017/04/23/2017-4-23/" itemprop="url">
                  2017-4-23
                </a>
              
            
          </h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              <span class="post-meta-item-text">发表于</span>
              <time title="Post created" itemprop="dateCreated datePublished" datetime="2017-04-23T09:48:31+08:00">
                2017-04-23
              </time>
            

            

            
          </span>

          
            <span class="post-category" >
              <span class="post-meta-divider">|</span>
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              <span class="post-meta-item-text">分类于</span>
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/我的青春流水账/" itemprop="url" rel="index">
                    <span itemprop="name">我的青春流水账</span>
                  </a>
                </span>

                
                
              
            </span>
          

          
            
          

          

          
          

          

          

        </div>
      </header>
    


    <div class="post-body" itemprop="articleBody">

      
      

      
        
          
            <h1 id="2017-4-23"><a href="#2017-4-23" class="headerlink" title="2017-4-23"></a>2017-4-23</h1><p>&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#x4ECA;&#x5929;&#x662F;2017&#x5E74;4&#x6708;22&#x5468;&#x516D;&#xFF0C;&#x6211;&#x5750;&#x5728;&#x53BB;&#x9093;&#x80D6;&#x5B50;&#x533B;&#x9662;&#x7684;&#x516C;&#x4EA4;&#x8F66;&#x4E0A;&#xFF0C;&#x5176;&#x5B9E;&#x5F88;&#x65E9;&#x5C31;&#x60F3;&#x5199;&#x8FD9;&#x7BC7;&#x6587;&#x7AE0;&#x8BB0;&#x5F55;&#x4E0B;&#x6700;&#x8FD1;&#x7684;&#x751F;&#x6D3B;&#xFF0C;&#x5948;&#x4F55;&#x6DF1;&#x77E5;&#x81EA;&#x5DF1;&#x6587;&#x7B14;&#x4E0D;&#x591F;&#xFF0C;&#x6240;&#x4EE5;&#x4E00;&#x76F4;&#x6CA1;&#x6709;&#x52A8;&#x624B;&#xFF0C;&#x73B0;&#x5728;&#x6B63;&#x597D;&#x65E0;&#x804A;&#x5C31;&#x5199;&#x4E0B;&#x5427;&#x3002;<br>&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#x8111;&#x888B;&#x91CC;&#x8FC7;&#x4E86;&#x4E00;&#x4E0B;&#xFF0C;&#x6700;&#x8FD1;&#x53D1;&#x751F;&#x4E86;&#x5F88;&#x591A;&#x4E8B;&#x60C5;&#x3002;&#x4E0A;&#x4E2A;&#x6708;&#x6211;&#x548C;&#x53E6;&#x5916;&#x4E24;&#x4E2A;&#x5C0F;&#x4F19;&#x4F34;&#x53BB;&#x53C2;&#x52A0;&#x4E86;&#x5B66;&#x6821;&#x7684;&#x79FB;&#x52A8;&#x5F00;&#x53D1;&#x6BD4;&#x8D5B;&#x7684;&#x9009;&#x62D4;&#x8D5B;&#xFF0C;&#x6BD4;&#x8D5B;&#x5B8C;&#x7B2C;&#x4E8C;&#x5929;&#x5C31;&#x901A;&#x77E5;&#x6211;&#x4EEC;&#x88AB;&#x9009;&#x4E0A;&#x4E86;&#xFF0C;&#x5FC3;&#x91CC;&#x5F53;&#x7136;&#x662F;&#x5F88;&#x9AD8;&#x5174;&#x7684;&#xFF0C;&#x6211;&#x4E5F;&#x4ECE;&#x672A;&#x770B;&#x89C1;&#x6EE1;&#x54E5;&#x70ED;&#x60C5;&#x5982;&#x6B64;&#x9AD8;&#x8FC7;&#xFF0C;&#x5F53;&#x5929;&#x5C31;&#x4ECE;&#x5BB6;&#x91CC;&#x8D76;&#x5230;&#x5B66;&#x6821;&#x91CC;&#x9762;&#x5E2E;&#x6211;&#x4EEC;&#x51E0;&#x4E2A;&#x5B89;&#x6392;&#x6559;&#x5BA4;&#xFF0C;&#x8BF7;&#x5047;&#xFF0C;&#x6EE1;&#x54E5;&#x8FD8;&#x548C;&#x6211;&#x4EEC;&#x8C08;&#x4E86;&#x4E00;&#x4E0B;&#x201C;&#x7537;&#x4EBA;&#x7406;&#x8BBA;&#x201D;&#x8BF4;&#x5B9E;&#x8BDD;&#x5F53;&#x65F6;&#x5F88;&#x611F;&#x52A8;&#xFF0C;&#x53EF;&#x6211;&#x5DF2;&#x7ECF;&#x5FD8;&#x8BB0;&#x4E86;&#x5F53;&#x65F6;&#x6EE1;&#x54E5;&#x7684;&#x539F;&#x8BDD;&#x662F;&#x4EC0;&#x4E48;&#x4E86;&#xFF0C;&#x8FD9;&#x4E2A;&#x6709;&#x70B9;&#x9057;&#x61BE;&#xFF0C;&#x5C31;&#x8FD9;&#x6837;&#x957F;&#x8FBE;&#x4E00;&#x4E2A;&#x6708;&#x7684;&#x96C6;&#x8BAD;&#x5C31;&#x5F00;&#x59CB;&#x4E86;&#xFF0C;&#x521A;&#x5F00;&#x59CB;&#x501F;&#x7740;&#x65B0;&#x9C9C;&#x611F;&#xFF0C;&#x6211;&#x4EEC;&#x5236;&#x5B9A;&#x4E86;&#x8BA1;&#x5212;&#xFF0C;&#x6BCF;&#x5929;&#x65E9;&#x4E0A;7.50&#x4ECE;&#x5BDD;&#x5BA4;&#x51FA;&#x53D1;&#x7136;&#x540E;&#x53BB;&#x5403;&#x65E9;&#x9910;&#xFF0C;&#x4E00;&#x76F4;&#x5728;&#x90A3;&#x91CC;&#x5F85;&#x5230;18.30&#x3002;&#x7B2C;&#x4E00;&#x4E2A;&#x793C;&#x62DC;&#x6211;&#x4EEC;&#x90FD;&#x4E25;&#x683C;&#x6267;&#x884C;&#x4E86;&#x8FD9;&#x4E2A;&#x8BA1;&#x5212;&#xFF0C;&#x6162;&#x6162;&#x7684;&#x5F53;&#x65B0;&#x9C9C;&#x611F;&#x4E00;&#x8FC7;&#x53BB;&#x6211;&#x4EEC;&#x5C31;&#x5F00;&#x59CB;&#x6162;&#x6162;&#x7684;&#x653E;&#x677E;&#x8D77;&#x6765;&#xFF0C;&#x65E9;&#x4E0A;8&#x70B9;&#x591A;&#x624D;&#x8D77;&#x6765;&#xFF0C;&#x6709;&#x51E0;&#x6B21;&#x4E0B;&#x5348;2&#x70B9;&#x591A;&#x5C31;&#x8D70;&#x4E86;&#xFF0C;&#x5F88;&#x662F;&#x60ED;&#x6127;&#xFF0C;&#x5199;&#x5230;&#x8FD9;&#x91CC;&#x60F3;&#x8D77;&#x4E00;&#x53E5;&#x8BDD;&#xFF0C;&#x867D;&#x7136;&#x548C;&#x73B0;&#x5728;&#x8BF4;&#x7684;&#x8FD9;&#x4E2A;&#x8BDD;&#x9898;&#x6CA1;&#x4EC0;&#x4E48;&#x5173;&#x7CFB;&#xFF0C;&#x4F46;&#x662F;&#x6211;&#x8FD8;&#x662F;&#x60F3;&#x5199;&#x8FD9;&#x5728;&#x8FD9;&#x91CC;:&#x201C;&#x4E00;&#x76F4;&#x8BA4;&#x4E3A;&#xFF0C;&#x6240;&#x8C13;&#x7684;&#x65B0;&#x9C9C;&#x611F;&#xFF0C;&#x4E0D;&#x662F;&#x548C;&#x672A;&#x77E5;&#x7684;&#x4EBA;&#x4E00;&#x8D77;&#x53BB;&#x505A;&#x76F8;&#x540C;&#x7684;&#x4E8B;&#x60C5;&#xFF0C;&#x800C;&#x662F;&#x548C;&#x5DF2;&#x77E5;&#x7684;&#x4EBA;&#x4E00;&#x8D77;&#x53BB;&#x4F53;&#x9A8C;&#x672A;&#x77E5;&#x7684;&#x4EBA;&#x751F;&#x3002;&#x201D;&#x6700;&#x8FD1;&#x517B;&#x6210;&#x4E86;&#x4E00;&#x4E2A;&#x4E60;&#x60EF;&#xFF0C;&#x5C31;&#x662F;&#x6709;&#x65F6;&#x5019;&#x770B;&#x5230;&#x559C;&#x6B22;&#x7684;&#x53E5;&#x5B50;&#x5C31;&#x4F1A;&#x6458;&#x6284;&#x5230;&#x8BB0;&#x4E8B;&#x672C;&#x91CC;&#x9762;&#xFF0C;&#x5E0C;&#x671B;&#x4EE5;&#x540E;<br>&#x770B;&#x5230;&#x7F8E;&#x666F;&#x65F6;&#xFF0C;&#x5F53;&#x522B;&#x4EBA;&#x53EA;&#x80FD;&#x8BF4;&#x201C;&#x6211;&#x64CD;&#xFF0C;&#x771F;&#x7F8E;&#x201D;&#xFF0C;&#x6211;&#x4E5F;&#x80FD;&#x8BF4;&#x51FA;&#x90A3;&#x53E5;&#x201C;&#x5927;&#x6F20;&#x5B64;&#x70DF;&#x76F4;&#xFF0C;&#x957F;&#x6CB3;&#x843D;&#x65E5;&#x5706;&#x201D;&#x3002;&#x54E6;&#xFF0C;&#x5BF9;&#x4E86;&#xFF0C;&#x73B0;&#x5728;&#x6BCF;&#x5929;&#x90FD;&#x4F1A;&#x66F4;&#x65B0;&#x4E0B;&#x535A;&#x5BA2;&#xFF0C;&#x628A;&#x5F53;&#x5929;&#x5B66;&#x7684;&#x4E1C;&#x897F;&#x8BB0;&#x5F55;&#x4E0B;&#x6765;&#xFF0C;&#x73B0;&#x5728;&#x6211;&#x4F1A;&#x5728;&#x6BCF;&#x4E00;&#x7BC7;&#x6280;&#x672F;&#x65E5;&#x5FD7;&#x524D;&#x9762;&#x52A0;&#x4E0A;&#x4E00;&#x6BB5;&#x7F8E;&#x53E5;&#xFF0C;&#x5E0C;&#x671B;&#x81EA;&#x5DF1;&#x6709;&#x610F;&#x6CA1;&#x610F;&#x5F97;&#x770B;&#x4E00;&#x770B;&#x3002;&#x5C31;&#x8FD9;&#x6837;&#x53C8;&#x8FC7;&#x4E86;&#x51E0;&#x5929;&#xFF0C;&#x6EE1;&#x54E5;&#x5E26;&#x6211;&#x53BB;&#x53C2;&#x52A0;&#x4E86;&#x5173;&#x4E8E;&#x7701;&#x8D5B;&#x7684;&#x8BF4;&#x660E;&#x4F1A;&#xFF0C;&#x8FD9;&#x4E0D;&#x662F;&#x91CD;&#x70B9;&#xFF0C;&#x5173;&#x952E;&#x662F;&#x4E2D;&#x5348;&#x548C;&#x9662;&#x957F;&#x4E66;&#x8BB0;&#x7B49;&#x4E00;&#x5927;&#x7247;&#x9886;&#x5BFC;&#x5403;&#x4E86;&#x996D;&#xFF0C;&#x5F88;&#x8363;&#x5E78;&#x4F46;&#x6211;&#x8FD8;&#x662F;&#x4E0D;&#x4E60;&#x60EF;&#x90A3;&#x79CD;&#x573A;&#x5408;&#xFF0C;&#x6211;&#x7406;&#x60F3;&#x7684;&#x751F;&#x6D3B;&#x5E94;&#x8BE5;&#x662F;&#x6709;&#x9152;&#xFF0C;&#x6709;&#xFF0C;&#x7B97;&#x4E86;&#xFF0C;&#x6211;&#x4E0D;&#x559D;&#x9152;&#xFF0C;&#x6709;&#x8001;&#x53CB;&#x5C31;&#x591F;&#x4E86;&#x3002;&#x90A3;&#x5468;&#x662F;&#x6211;&#x672C;&#x5B66;&#x671F;&#x7B2C;&#x4E00;&#x6B21;&#x6CA1;&#x6709;&#x56DE;&#x5BB6;&#xFF0C;&#x7B2C;&#x4E8C;&#x5468;&#x662F;&#x6E05;&#x660E;&#x8282;&#x5047;&#x671F;&#xFF0C;&#x6CA1;&#x4EBA;&#x7BA1;&#x7684;&#x61D2;&#x6563;&#x65F6;&#x95F4;&#x603B;&#x662F;&#x8FC7;&#x5F97;&#x5F88;&#x5FEB;&#x7684;&#xFF0C;&#x5230;&#x4E86;&#x6E05;&#x660E;&#x8282;&#x653E;&#x5047;&#x7684;&#x65F6;&#x5019;&#x4E86;&#xFF0C;&#x90A3;&#x5929;&#x6211;&#x548C;&#x6D82;sir&#x4E00;&#x8D77;&#x9A91;&#x81EA;&#x884C;&#x8F66;&#x56DE;&#x7684;&#x5BB6;&#xFF0C;&#x5F88;&#x4E45;&#x6CA1;&#x6709;&#x60F3;&#x90A3;&#x6837;&#x8FD0;&#x52A8;&#x8FC7;&#x4E86;&#x3002;&#x63A5;&#x4E0B;&#x6765;&#x7684;&#x662F;&#x4E00;&#x6BB5;&#x91CD;&#x590D;&#x7684;&#x65E5;&#x5B50;&#x6BCF;&#x5929;&#x5403;&#x996D;&#x7761;&#x89C9;&#xFF0C;&#x5199;&#x4EE3;&#x7801;&#xFF0C;&#x8C03;&#x4F83;Zavion&#x3002;&#x91CD;&#x590D;&#x7684;&#x65E5;&#x5B50;&#x603B;&#x662F;&#x65E0;&#x804A;&#x7684;&#xFF0C;&#x67D0;&#x5929;&#x6211;&#x4ECE;&#x5BA4;&#x53CB;&#x90A3;&#x91CC;&#x62FF;&#x4E86;&#x4E00;&#x672C;&#x4F59;&#x534E;&#x5199;&#x7684;&#x300A;&#x6D3B;&#x7740;&#x300B;&#xFF0C;&#x8001;&#x5B9E;&#x8BF4;&#xFF0C;&#x5728;&#x6211;&#x8FC7;&#x53BB;19&#x5E74;&#x5C81;&#x6708;&#x91CC;&#x6211;&#x5176;&#x5B9E;&#x662F;&#x4E0D;&#x7231;&#x770B;&#x4E66;&#x7684;&#xFF0C;&#x56E0;&#x4E3A;&#x6211;&#x89C9;&#x5F97;&#x770B;&#x8FD9;&#x79CD;&#x6587;&#x5B66;&#x4E66;&#x597D;&#x6D6A;&#x8D39;&#x65F6;&#x95F4;&#xFF0C;&#x73B0;&#x5728;&#x4E0D;&#x8FD9;&#x4E48;&#x60F3;&#x4E86;&#xFF0C;&#x6211;&#x4E00;&#x53E3;&#x6C14;&#x4E70;&#x4E86;7&#x672C;&#x4E66;&#xFF0C;&#x613F;&#x4EE5;&#x540E;&#x548C;&#x522B;&#x4EBA;&#x8BA8;&#x8BBA;&#x7684;&#x65F6;&#x5019;&#x80FD;&#x6709;&#x4E2A;&#x88C5;&#x903C;&#x7684;&#x8D44;&#x672C;&#xFF0C;&#x589E;&#x52A0;&#x70B9;&#x5185;&#x6DB5;&#x3002;&#x8FD9;&#x7BC7;&#x6D41;&#x6C34;&#x8D26;&#x65F6;&#x95F4;&#x5DF2;&#x7ECF;&#x8BB0;&#x5230;&#x4E86;&#x73B0;&#x5728;&#xFF0C;&#x6211;&#x4E5F;&#x4ECE;&#x6628;&#x5929;&#x5199;&#x5230;&#x4E86;&#x4ECA;&#x5929;&#xFF08;2017&#x5E74;4&#x6708;23&#x65E5;&#xFF09;&#xFF0C;&#x6628;&#x5929;&#x5EA6;&#x8FC7;&#x4E86;&#x975E;&#x5E38;&#x6109;&#x5FEB;&#x7684;&#x4E00;&#x5929;&#xFF0C;&#x6BC5;&#x5C11;&#x548C;&#x8D75;&#x6CFD;&#x7684;&#x53E6;&#x5916;&#x7684;&#x4E00;&#x4E2A;&#x540C;&#x5B66;&#x51C6;&#x5907;&#x5230;&#x542B;&#x6D66;&#x53BB;&#x73A9;&#xFF0C;&#x6211;&#x76F4;&#x63A5;&#x4ECE;&#x4E00;&#x533B;&#x9662;&#x53BB;&#x6B65;&#x884C;&#x8857;&#x627E;&#x4E86;&#x6BC5;&#x5C11;&#xFF0C;&#x7136;&#x540E;&#x90A3;&#x91CC;&#x7B49;&#x4E86;&#x8D75;&#x6CFD;&#x4E00;&#x4E0B;&#x5348;&#xFF0C;&#x4E00;&#x76F4;&#x5230;&#x665A;&#x4E0A;8&#x70B9;&#x624D;&#x5230;&#x4E2D;&#x533B;&#xFF0C;&#x665A;&#x4E0A;&#x627E;&#x4E86;&#x5BB6;&#x70E4;&#x9C7C;&#x5E97;&#xFF0C;&#x4E00;&#x8D77;&#x8C03;&#x4F83;&#x8C03;&#x4F83;&#x4E00;&#x8D77;&#x626F;&#x626F;&#x6BB5;&#x5B50;&#xFF0C;&#x5C31;&#x591F;&#x4E86;&#xFF0C;&#x751F;&#x6D3B;&#x672C;&#x5E94;&#x8FD9;&#x6837;&#x3002;&#x665A;&#x4E0A;&#x6211;&#x4EEC;&#x626F;&#x6BB5;&#x5B50;&#x5230;&#x51CC;&#x6668;2&#x70B9;&#xFF0C;&#x5F88;&#x4E45;&#x6CA1;&#x8FD9;&#x4E48;&#x665A;&#x7761;&#x4E86;&#xFF0C;&#x4F46;&#x6211;&#x89C9;&#x5F97;&#x5F88;&#x503C;&#x5F97;&#xFF0C;&#x65E0;&#x5948;&#x7684;&#x662F;&#x4ECA;&#x5929;7&#x70B9;&#x5C31;&#x8981;&#x8D77;&#x6765;&#x53BB;&#x5B66;&#x6821;&#xFF0C;&#x6EE1;&#x54E5;&#x4ECA;&#x5929;&#x4F1A;&#x53BB;509&#x89C6;&#x5BDF;&#x6211;&#x4EEC;&#x7684;&#x60C5;&#x51B5;&#x3002;&#x73B0;&#x5728;&#x662F;8.20&#x6211;&#x8D70;&#x5728;&#x53BB;&#x8F6F;&#x4EF6;&#x7684;&#x8DEF;&#x4E0A;&#xFF0C;&#x751F;&#x6D3B;&#x8FD8;&#x5F97;&#x7EE7;&#x7EED;&#x3002;<br>&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#x5E0C;&#x671B;&#x591A;&#x5E74;&#x4EE5;&#x540E;&#x6211;&#x518D;&#x6B21;&#x770B;&#x5230;&#x8FD9;&#x7BC7;&#x6587;&#x7AE0;&#x65F6;&#x80FD;&#x611F;&#x53F9;:&#x6211;&#x64CD;&#xFF0C;&#x6211;TM&#x8FD8;&#x505A;&#x8FC7;&#x8FD9;&#x4E48;&#x725B;&#x903C;&#x7684;&#x4E8B;&#x60C5;&#xFF1F;&#x5F88;&#x4FD7;&#x4F46;&#x5F88;&#x6709;&#x6210;&#x5C31;&#x611F;&#x3002;</p>

          
        
      
    </div>

    <div>
      
    </div>

    <div>
      
    </div>


    <footer class="post-footer">
      

      

      
      
        <div class="post-eof"></div>
      
    </footer>
  </article>


    
      

  

  
  
  

  <article class="post post-type-normal " itemscope itemtype="http://schema.org/Article">
  <link itemprop="mainEntityOfPage" href="http://yoursite.com/2017/04/21/Struts3-拦截器/">

  <span style="display:none" itemprop="author" itemscope itemtype="http://schema.org/Person">
    <meta itemprop="name" content="JokerLiang">
    <meta itemprop="description" content="">
    <meta itemprop="image" content="/images/me.jpg">
  </span>

  <span style="display:none" itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
    <meta itemprop="name" content="JokerLiang">
    <span style="display:none" itemprop="logo" itemscope itemtype="http://schema.org/ImageObject">
      <img style="display:none;" itemprop="url image" alt="JokerLiang" src="">
    </span>
  </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">
            
            
              
                
                <a class="post-title-link" href="/2017/04/21/Struts3-拦截器/" itemprop="url">
                  Struts3-拦截器
                </a>
              
            
          </h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              <span class="post-meta-item-text">发表于</span>
              <time title="Post created" itemprop="dateCreated datePublished" datetime="2017-04-21T19:48:10+08:00">
                2017-04-21
              </time>
            

            

            
          </span>

          
            <span class="post-category" >
              <span class="post-meta-divider">|</span>
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              <span class="post-meta-item-text">分类于</span>
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/Struts/" itemprop="url" rel="index">
                    <span itemprop="name">Struts</span>
                  </a>
                </span>

                
                
              
            </span>
          

          
            
          

          

          
          

          

          

        </div>
      </header>
    


    <div class="post-body" itemprop="articleBody">

      
      

      
        
          <blockquote>
<p>愿你走出半生，归来任是少年</p>
</blockquote>
<h3 id="拦截器的创建方式"><a href="#拦截器的创建方式" class="headerlink" title="拦截器的创建方式"></a>拦截器的创建方式</h3><figure class="highlight java"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">//继承:MethodFilterInterceptor 方法过滤拦截器</span></span><br><span class="line"><span class="comment">//功能: 定制拦截器拦截的方法.</span></span><br><span class="line"><span class="comment">//	定制哪些方法需要拦截.</span></span><br><span class="line"><span class="comment">//	定制哪些方法不需要拦截</span></span><br><span class="line"><span class="keyword">public</span> <span class="class"><span class="keyword">class</span> <span class="title">MyInterceptor3</span> <span class="keyword">extends</span> <span class="title">MethodFilterInterceptor</span></span>&#123;</span><br><span class="line"></span><br><span class="line">	<span class="meta">@Override</span></span><br><span class="line">	<span class="function"><span class="keyword">protected</span> String <span class="title">doIntercept</span><span class="params">(ActionInvocation invocation)</span> <span class="keyword">throws</span> Exception </span>&#123;</span><br><span class="line">		<span class="comment">//前处理</span></span><br><span class="line">		System.out.println(<span class="string">"MyInterceptor3 的前处理!"</span>);</span><br><span class="line">		<span class="comment">//放行</span></span><br><span class="line">		String result = invocation.invoke();</span><br><span class="line">		<span class="comment">//后处理</span></span><br><span class="line">		System.out.println(<span class="string">"MyInterceptor3 的后处理!"</span>);</span><br><span class="line">		</span><br><span class="line">		<span class="keyword">return</span> result;</span><br><span class="line">	&#125;</span><br><span class="line"></span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
          <!--noindex-->
          <div class="post-more-link text-center">
            <a class="btn" href="/2017/04/21/Struts3-拦截器/#more" rel="contents">
              阅读全文 &raquo;
            </a>
          </div>
          <!--/noindex-->
        
      
    </div>

    <div>
      
    </div>

    <div>
      
    </div>


    <footer class="post-footer">
      

      

      
      
        <div class="post-eof"></div>
      
    </footer>
  </article>


    
  </section>

  
  <nav class="pagination">
    <a class="extend prev" rel="prev" href="/page/2/"><i class="fa fa-angle-left"></i></a><a class="page-number" href="/">1</a><a class="page-number" href="/page/2/">2</a><span class="page-number current">3</span><a class="page-number" href="/page/4/">4</a><span class="space">&hellip;</span><a class="page-number" href="/page/7/">7</a><a class="extend next" rel="next" href="/page/4/"><i class="fa fa-angle-right"></i></a>
  </nav>



          </div>
          


          

        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    <div class="sidebar-inner">

      

      

      <section class="site-overview sidebar-panel sidebar-panel-active">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
          <img class="site-author-image" itemprop="image"
               src="/images/me.jpg"
               alt="JokerLiang" />
          <p class="site-author-name" itemprop="name">JokerLiang</p>
          <p class="site-description motion-element" itemprop="description">永远年轻，永远热泪盈眶。</p>
        </div>
        <nav class="site-state motion-element">
          <div class="site-state-item site-state-posts">
            <a href="/archives">
              <span class="site-state-item-count">61</span>
              <span class="site-state-item-name">日志</span>
            </a>
          </div>

          
            <div class="site-state-item site-state-categories">
              <a href="/categories">
                <span class="site-state-item-count">15</span>
                <span class="site-state-item-name">分类</span>
              </a>
            </div>
          

          
            <div class="site-state-item site-state-tags">
              <a href="/tags">
                <span class="site-state-item-count">17</span>
                <span class="site-state-item-name">标签</span>
              </a>
            </div>
          

        </nav>

        

        <div class="links-of-author motion-element">
          
            
              <span class="links-of-author-item">
                <a href="https://github.com/LoverJoker" target="_blank" title="GitHub">
                  
                    <i class="fa fa-fw fa-github"></i>
                  
                  GitHub
                </a>
              </span>
            
              <span class="links-of-author-item">
                <a href="https://www.zhihu.com/people/lover-easy-7/activities" target="_blank" title="Twitter">
                  
                    <i class="fa fa-fw fa-twitter"></i>
                  
                  Twitter
                </a>
              </span>
            
              <span class="links-of-author-item">
                <a href="http://weibo.com/2292572142/profile?rightmod=1&wvr=6&mod=personinfo" target="_blank" title="微博">
                  
                    <i class="fa fa-fw fa-globe"></i>
                  
                  微博
                </a>
              </span>
            
          
        </div>

        
        

        
        
          <div class="links-of-blogroll motion-element links-of-blogroll-inline">
            <div class="links-of-blogroll-title">
              <i class="fa  fa-fw fa-globe"></i>
              Friends
            </div>
            <ul class="links-of-blogroll-list">
              
                <li class="links-of-blogroll-item">
                  <a href="http://www.knight.ac.cn/" title="Knight" target="_blank">Knight</a>
                </li>
              
                <li class="links-of-blogroll-item">
                  <a href="http://lzllzl.cn/" title="Zayvion" target="_blank">Zayvion</a>
                </li>
              
                <li class="links-of-blogroll-item">
                  <a href="http://chen97.com/" title="Chens" target="_blank">Chens</a>
                </li>
              
            </ul>
          </div>
        

        


      </section>

      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright" >
  
  &copy; 
  <span itemprop="copyrightYear">2018</span>
  <span class="with-love">
    <i class="fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">JokerLiang</span>
</div>


<div class="powered-by">
  由 <a class="theme-link" href="https://hexo.io">Hexo</a> 强力驱动
</div>

<div class="theme-info">
  主题 -
  <a class="theme-link" href="https://github.com/iissnan/hexo-theme-next">
    NexT.Mist
  </a>
</div>


        

        
      </div>
    </footer>

    <div class="back-to-top">
      <i class="fa fa-arrow-up"></i>
    </div>
  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>









  



  
  <script type="text/javascript" src="/lib/jquery/index.js?v=2.1.3"></script>

  
  <script type="text/javascript" src="/lib/fastclick/lib/fastclick.min.js?v=1.0.6"></script>

  
  <script type="text/javascript" src="/lib/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>

  
  <script type="text/javascript" src="/lib/velocity/velocity.min.js?v=1.2.1"></script>

  
  <script type="text/javascript" src="/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>

  
  <script type="text/javascript" src="/lib/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>


  


  <script type="text/javascript" src="/js/src/utils.js?v=5.1.0"></script>

  <script type="text/javascript" src="/js/src/motion.js?v=5.1.0"></script>



  
  

  

  


  <script type="text/javascript" src="/js/src/bootstrap.js?v=5.1.0"></script>



  



  




	




  
  
  <script type="text/javascript">
    // Popup Window;
    var isfetched = false;
    // Search DB path;
    var search_path = "search.xml";
    if (search_path.length == 0) {
      search_path = "search.xml";
    }
    var path = "/" + search_path;
    // monitor main search box;

    function proceedsearch() {
      $("body").append('<div class="popoverlay">').css('overflow', 'hidden');
      $('.popup').toggle();
    }
    // search function;
    var searchFunc = function(path, search_id, content_id) {
      'use strict';
      $.ajax({
        url: path,
        dataType: "xml",
        async: true,
        success: function( xmlResponse ) {
          // get the contents from search data
          isfetched = true;
          $('.popup').detach().appendTo('.header-inner');
          var datas = $( "entry", xmlResponse ).map(function() {
            return {
              title: $( "title", this ).text(),
              content: $("content",this).text(),
              url: $( "url" , this).text()
            };
          }).get();
          var $input = document.getElementById(search_id);
          var $resultContent = document.getElementById(content_id);
          $input.addEventListener('input', function(){
            var matchcounts = 0;
            var str='<ul class=\"search-result-list\">';
            var keywords = this.value.trim().toLowerCase().split(/[\s\-]+/);
            $resultContent.innerHTML = "";
            if (this.value.trim().length > 1) {
              // perform local searching
              datas.forEach(function(data) {
                var isMatch = false;
                var content_index = [];
                var data_title = data.title.trim().toLowerCase();
                var data_content = data.content.trim().replace(/<[^>]+>/g,"").toLowerCase();
                var data_url = decodeURIComponent(data.url);
                var index_title = -1;
                var index_content = -1;
                var first_occur = -1;
                // only match artiles with not empty titles and contents
                if(data_title != '') {
                  keywords.forEach(function(keyword, i) {
                    index_title = data_title.indexOf(keyword);
                    index_content = data_content.indexOf(keyword);
                    if( index_title >= 0 || index_content >= 0 ){
                      isMatch = true;
                      if (i == 0) {
                        first_occur = index_content;
                      }
                    }

                  });
                }
                // show search results
                if (isMatch) {
                  matchcounts += 1;
                  str += "<li><a href='"+ data_url +"' class='search-result-title'>"+ data_title +"</a>";
                  var content = data.content.trim().replace(/<[^>]+>/g,"");
                  if (first_occur >= 0) {
                    // cut out 100 characters
                    var start = first_occur - 20;
                    var end = first_occur + 80;
                    if(start < 0){
                      start = 0;
                    }
                    if(start == 0){
                      end = 50;
                    }
                    if(end > content.length){
                      end = content.length;
                    }
                    var match_content = content.substring(start, end);
                    // highlight all keywords
                    keywords.forEach(function(keyword){
                      var regS = new RegExp(keyword, "gi");
                      match_content = match_content.replace(regS, "<b class=\"search-keyword\">"+keyword+"</b>");
                    });

                    str += "<p class=\"search-result\">" + match_content +"...</p>"
                  }
                  str += "</li>";
                }
              })};
            str += "</ul>";
            if (matchcounts == 0) { str = '<div id="no-result"><i class="fa fa-frown-o fa-5x" /></div>' }
            if (keywords == "") { str = '<div id="no-result"><i class="fa fa-search fa-5x" /></div>' }
            $resultContent.innerHTML = str;
          });
          proceedsearch();
        }
      });}

    // handle and trigger popup window;
    $('.popup-trigger').click(function(e) {
      e.stopPropagation();
      if (isfetched == false) {
        searchFunc(path, 'local-search-input', 'local-search-result');
      } else {
        proceedsearch();
      };
    });

    $('.popup-btn-close').click(function(e){
      $('.popup').hide();
      $(".popoverlay").remove();
      $('body').css('overflow', '');
    });
    $('.popup').click(function(e){
      e.stopPropagation();
    });
  </script>


  

  

  

  


</body>
</html>
